from po.add_member_page import AddMemberPage
from po.base_page import BasePage


class ContactPage(BasePage):
    def goto_add_member(self):
        """
        跳转添加成员页面
        :return:
        """
        self.driver.find_element_by_css_selector(".ww_operationBar .js_add_member").click()
        return AddMemberPage(self.driver)

    def get_member_list(self):
        """
        获取成员列表
        :return:
        """
        member_list = []
        eles = self.driver.find_elements_by_css_selector(".member_colRight_memberTable_td:nth-child(2)")
        print(eles)
        for ele in eles:
            member_list.append(ele.get_attribute("title"))
        return member_list